/*
 * @Descripttion: 
 * @version: @ 1.0.0
 * @Author: 朱江洲
 * @Date: 2022-01-10 13:24:57
 * @LastEditors: 朱江洲
 * @LastEditTime: 2022-03-18 17:03:26
 */
import request from "@/utils/request.js";

// - 项目管理-项目列表
export const dailyList = params => {
    return request({
        method: 'get',
        url: '/task/daily/list',
        params
    })
}

// - 日常任务-任务新增
export const addDaily = data => {
    return request({
        method: 'post',
        url: '/task/daily/add',
        data
    })
}
// - 日常任务-任务新增
export const editDaily = data => {
    return request({
        method: 'post',
        url: '/task/daily/edit',
        data
    })
}
// - 日常任务-任务删除
export const delDaily = params => {
    return request({
        method: 'delete',
        url: '/task/daily/del',
        params
    })
}
// - 日常任务-任务新增-项目列表
export const projectList = params => {
    return request({
        method: 'get',
        url: '/task/daily/projectList',
        params
    })
}
// - 日常任务-任务新增-清单列表
export const orderList = params => {
    return request({
        method: 'get',
        url: '/task/daily/orderList',
        params
    })
}
// - 日常任务-任务完成
export const finish = params => {
    return request({
        method: 'get',
        url: '/task/daily/finish',
        params
    })
}
// - 日常任务-更换负责人
export const changeDirector = params => {
    return request({
        method: 'get',
        url: '/task/daily/changeDirector',
        params
    })
}
// - 日常任务-参与人列表
export const memberList = params => {
    return request({
        method: 'get',
        url: '/task/daily/memberList',
        params
    })
}
// - 日常任务-子任务列表
export const taskList = params => {
    return request({
        method: 'get',
        url: '/task/daily/taskList',
        params
    })
}
// - 日常任务-附件列表
export const fileList = params => {
    return request({
        method: 'get',
        url: '/task/daily/fileList',
        params
    })
}
// - 日常任务-预览附件
export const filePreview = params => {
    return request({
        method: 'get',
        url: '/task/daily/filePreview',
        params
    })
}
// - 日常任务-删除附件

export const delFile = params => {
    return request({
        method: 'delete',
        url: '/task/daily/fileDelete',
        params
    })
}

// - 日常任务-评论列表

export const commentList = params => {
    return request({
        method: 'get',
        url: '/task/daily/commentList',
        params
    })
}

// - 日常任务-发布评论

export const commentPush = data => {
    return request({
        method: 'post',
        url: '/task/daily/commentPush',
        data
    })
}
// - 日常任务-删除附件
export const commentDelete = params => {
    return request({
        method: 'delete',
        url: '/task/daily/commentDelete',
        params
    })
}

// - 日常任务-新增参与人
export const fileAdd = data => {
    return request({
        method: 'post',
        url: '/task/daily/fileAdd',
        data
    })
}
// - 日常任务-新增参与人
export const memberAdd = data => {
    return request({
        method: 'post',
        url: '/task/daily/memberAdd',
        data
    })
}

// - 日常任务-新增关联业务
export const crmAdd = data => {
    return request({
        method: 'post',
        url: '/task/daily/crmAdd',
        data
    })
}

// - 日常任务-关联业务列表
export const crmList = params => {
    return request({
        method: 'get',
        url: '/task/daily/crmList',
        params
    })
}

// - 日常任务-关联业务删除
export const crmDelete = params => {
    return request({
        method: 'delete',
        url: '/task/daily/crmDelete',
        params
    })
}
// - 日常任务-关联业务详情
export const crmInfo = params => {
    return request({
        method: 'get',
        url: '/task/daily/crmInfo',
        params
    })
}

// - 日常任务-导入
export const importData = data => {
    return request({
        method: 'post',
        url: '/task/daily/importData',
        data
    })
}
// - 日常任务-导出模板
export const exportTemplate = params => {
    return request({
        method: 'get',
        url: '/task/daily/exportTemplate',
        params
    })
}

// - 日常任务-导出
export const exportData = params => {
    return request({
        method: 'get',
        url: '/task/daily/exportData',
        params
    })
}

// - 标签列表
export const labelList = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/label/list',
        params
    })
}


// - 新增/修改标签
export const labelUpdate = data => {
    return request({
        method: 'post',
        url: '/serviceProvide/label/update',
        data
    })
}

// - 删除标签
export const labelDelete = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/label/delete',
        params
    })
}

// - 查找标签
export const labelSelect = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/label/select',
        params
    })
}

// - 展示选中任务标签
export const selectLabelsByTaskId = params => {
    return request({
        method: 'get',
        url: '/serviceProvide/label/selectLabelsByTaskId',
        params
    })
}
// - 编辑任务标签
export const updateLabelTaskByTaskIdAndLabelIds = data => {
    return request({
        method: 'post',
        url: '/serviceProvide/label/updateLabelTaskByTaskIdAndLabelIds',
        data
    })
}

// 编辑描述
export const updateRemark = data => {
    return request({
        method: 'post',
        url: '/task/daily/updateRemark',
        data
    })
}

// 详细信息
export const detailInfo = params => {
    return request({
        method: 'get',
        url: '/task/daily/select',
        params
    })
}

// 是否展示标签
export const enableLabelTask = params => {
    return request({
        method: 'get',
        url: 'serviceProvide/label/enableLabelTask',
        params
    })
}

